<template>
  <div>
    <a-button type="primary" icon="sync" :loading="iconLoading" @click="enterIconLoading">
      <!-- <a-icon type="sync" spin /> -->
      Loading
    </a-button>
    <a-button type="primary" size="small" loading>
      Loading
    </a-button>
    <br />
    <a-button type="primary" :loading="loading" @mouseenter="enterLoading">
      mouseenter me!
    </a-button>
    <a-button type="primary" icon="poweroff" :loading="iconLoading" @click="enterIconLoading">
      延迟1s
    </a-button>
    <br />
    <a-button type="primary" loading />
    <a-button type="primary" shape="circle" loading />
    <a-button type="danger" shape="round" loading />
    <a-icon type="rollback" />
    <a-icon type="home" />
    <a-icon type="setting" theme="filled" />
    <a-icon type="smile" theme="outlined" />
    <a-icon type="smile" :rotate="180" />
    <a-icon type="loading" />
  </div>
</template>

<script>
export default {
  name: 'ant_button',
  data () {
    return {
      loading: false,
      iconLoading: false
    }
  },
  methods: {
    enterLoading () {
      this.loading = true
    },
    enterIconLoading () {
      this.iconLoading = { delay: 1000 }
    }
  }
}
</script>
